package com.mysterymall.Controller;

import com.mysterymall.Common.Comp.Log;
import com.mysterymall.Common.Utils.Result;
import com.mysterymall.Service.GoodsTypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName com.mysterymall.Controller
 * @Description
 * @Author HuangWX
 * @Time 2023/11/20  00:20
 */
@RestController
@RequestMapping("/goodsType")
public class GoodsTypeCont {

    private final  GoodsTypeService goodsTypeService;


    /**
     * 构造器注入
     * @param goodsTypeService 商品类别服务
     */
    public GoodsTypeCont(GoodsTypeService goodsTypeService) {
        this.goodsTypeService = goodsTypeService;
    }


    /**
     * 查询类别列表
     * @return Result
     */
    @GetMapping("/getShowType")
    @Log
    public Result getShowType(HttpServletRequest request){
        return goodsTypeService.getShowType(request);
    }

}
